<%template _header%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>
<%namespace YouHP.BLL%>
<!--header end-->


<script type="text/javascript">

	function checkCheckBox(form,objtag,itemname)
	{
		if (typeof(objtag.checked) == "undefined")
		{
			objtag.checked = true;
		}
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == itemname) 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
	
	function AdminSubmit(adminId,adminType)
	{
		_$('AdminId').value = adminId;
		_$('AdminType').value = adminType;
	}
	
</script>

<!--主体-->
<div class="layout-cols2">
<div class="pannelcontent_1">

	<div class="pcontent">
	   <div  class="panneldetail">
		<%template _memgroupmenu%>
			<div class="pannelbody">
			
                <%if IsPost%>
                <%template _msgbox%>
                <%else%>
					<div class="memberlist">

							<%csharp%>if(ApplyList.Count > 0) { <%/csharp%>
							<b>等待审批的用户({ApplyList.Count}人)</b>
							<form action="" method="post" ID="applyform">
								<input type="hidden" name="formtype" value="1"></input>
							<input type="hidden" name="applytype" id="applytype" value="0"></input>
	                        <ul>
	                        <li>&nbsp;</li>
	                        <li>头像</li>
	                        <li>用户形象</li>
	                        <li>申请时间</li>
	                        
	                        </ul>

				         	<%csharp%> foreach(GroupUserInfo info in ApplyList) { string avatar=UserBLL.Instance.GetUserInfo(info.UserId).Avatar; <%/csharp%>
							    <ul>  
							  	<li><input name="applyid" id="applyid{info.UserId}" type="checkbox" value="{info.UserId}" style="margin-top:-1px;"/></li>
                                <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + info.UserId; <%/csharp%>
                                 <li><a href="{this.GetUrl(TempUrl)}" target="_blank"><img src="{avatar}" width="48px" height="48px" /></a>
							    <p><a href="{this.GetUrl(TempUrl)}" target="_blank">{info.UserName}</a></p></li>
							    <li>{info.JoinTime.ToString("yyyy-MM-dd")}</li>
							    <li>{info.PostCount}</li>
							   </ul>
							
								<%csharp%> } <%/csharp%>
							</form><br />
							<div style="text-align:right; padding-right:10px;">
								<a href="javascript:checkCheckBox(_$('applyform'),this,'applyid')" class="selectall">全选</a>&nbsp;&nbsp;&nbsp;
								<a href="javascript:_$('applytype').value=1; _$('applyform').submit();"  class="selectall">批准</a>&nbsp;&nbsp;&nbsp;
								<a href="javascript:_$('applytype').value=2; _$('applyform').submit();"  class="selectall">忽略</a>
							</div>														
							<%csharp%>}<%/csharp%>
							<br />
	
							<%csharp%>if(GroupUserData.Role==2){<%/csharp%>
							<b>管理员({AdminList.Count}人)</b>
							<form action="" method="post" ID="adminform">
								<input type="hidden" name="formtype" value="2"></input>
							<input type="hidden" name="admintype" id="admintype" value="0"></input>
	                        <ul>
	                        <li>选择</li>
	                        <li>用户形象</li>
	                        <li>加入时间</li>
	                        <li>活跃度（发帖量+回复数）</li>
	                        </ul>
                              

								<%csharp%> foreach(GroupUserInfo info in AdminList) { string avatar=UserBLL.Instance.GetUserInfo(info.UserId).Avatar; <%/csharp%>
							    <ul>  
							  	<li><input name="adminid" id="adminid{info.UserId}" type="checkbox" value="{info.UserId}" style="margin-top:-1px;"/></li>
                                <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + info.UserId; <%/csharp%>
                                 <li><a href="{this.GetUrl(TempUrl)}" target="_blank"><img src="{avatar}" width="48px" height="48px" /></a>
							    <p><a href="{this.GetUrl(TempUrl)}" target="_blank">{info.UserName}</a></p></li>
							    <li>{info.JoinTime.ToString("yyyy-MM-dd")}</li>
							    <li>{info.PostCount}</li>
							   </ul>
							
								<%csharp%> } <%/csharp%>
					        
			
								 
							<br />
							<div style="text-align:right; padding-right:10px;">
							<a href="javascript:checkCheckBox(_$('adminform'),this,'adminid')" class="btn">全选</a>&nbsp;&nbsp;&nbsp;
							<a href="javascript:_$('admintype').value=1; _$('adminform').submit();"  class="btn">降为普通成员</a>&nbsp;&nbsp;&nbsp;
							<a href="javascript:_$('admintype').value=2; _$('adminform').submit();" class="btn">删除</a>
							</div>
							</form>
							<%csharp%>}<%/csharp%>
							
							<br />
						
							
                        <b>普通成员({MemberList.Count}人)</b>
							<form action="" method="post" ID="memberform">
							<input type="hidden" name="formtype" value="3"></input>
							<input type="hidden" name="membertype" id="membertype" value="0"></input>
			                <ul>
	                        <li>选择</li>
	                        <li>用户形象</li>
	                        <li>加入时间</li>
	                        <li>活跃度（发帖量+回复数）</li>
	                        
	                        </ul>
							
								<%csharp%> foreach(GroupUserInfo info in MemberList) { string avatar=UserBLL.Instance.GetUserInfo(info.UserId).Avatar; <%/csharp%>
							    <ul>  
							  	<li><input name="memberid" id="memberid{info.UserId}" type="checkbox" value="{info.UserId}" style="margin-top:-1px;"/></li>
                                <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + info.UserId; <%/csharp%>
                                 <li><a href="{this.GetUrl(TempUrl)}" target="_blank"><img src="{avatar}" width="48px" height="48px" /></a>
							    <p><a href="{this.GetUrl(TempUrl)}" target="_blank">{info.UserName}</a></p></li>
							    <li>{info.JoinTime.ToString("yyyy-MM-dd")}</li>
							    <li>{info.PostCount}</li>
							   </ul>
							
								<%csharp%> } <%/csharp%>
									 
                                    <div style="clear:both;"></div>
                                    <div style="padding:10px;">
                                    <div class="pages">
                                    {PageNumberString}
                                    </div>
                                    </div>
							<div style="text-align:right; padding-right:10px; padding-bottom:10px; padding-top:10px;">
							<a href="javascript:checkCheckBox(_$('memberform'),this,'memberid')" class="btn">全选</a>&nbsp;&nbsp;&nbsp;
							<a href="javascript:_$('membertype').value=1; _$('memberform').submit();" class="btn">升为管理员</a>&nbsp;&nbsp;&nbsp;
							<a href="javascript:_$('membertype').value=2; _$('memberform').submit();" class="btn">删除</a>
							</div>
							</form>

						
						</div>
				<%/if%>
			  </div>
			</div>
		</div>		

</div>
</div>
<!--主体-->
<%template _footer%>
